<template>
    
  <div>
    <el-tree
      :data="menuData"
      :props="defaultProps"
      @node-click="handleNodeClick"
    ></el-tree>
  </div>
</template>

<script>
export default {
  name: "MenuListAdd",
  components: {},
  props: {},
  data() {
    return {
      menuData: [],
      defaultProps: {
        children: "children",
        label: "name",
      },
    };
  },
  computed: {},
  watch: {},
  created() {
    this.menuData = JSON.parse(window.sessionStorage.getItem("menuList")).filter(menu=>
        menu.type!=-1
    );
    
  },
  mounted() {},
  methods: {
    handleNodeClick(data) {
      console.log(data);
    },
  },
};
</script>

<style scoped lang="scss">
</style>
